using ICSharpCode.NRefactory.CSharp;
using Xunit;

namespace Framework.Tests.Refactoring
{
    public static class AstTypeExtension
    {
        public static bool AreEquals(this PrimitiveType astType, PrimitiveType target)
        {
            return astType.Keyword == target.Keyword;
        }
    }

    public class AstTypeExtensionTest
    {
        [Fact]
        public void Shouls_return_false_when()
        {
            
        }

        AstType astType = new ComposedType();
        
        [Fact]
        public void Should_return_true_when_primitive_types_are_same()
        {
            var astType1 = new PrimitiveType("string");
            var astType2 = new PrimitiveType("string");
            Assert.True(astType1.AreEquals(astType2));
        }

        [Fact]
        public void Should_return_false_when_primitive_types_are_differents()
        {
            var astType1 = new PrimitiveType("string");
            var astType2 = new PrimitiveType("int");
            Assert.False(astType1.AreEquals(astType2));
        }
    }
}